package com.mark.springboot.dao;


import com.mark.springboot.domain.TableFileds;
import com.mark.springboot.domain.Tables;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @description  desc 查询表数据
 * @author Gavin
 * @date 2020-09-10 07:21

 * @return
 * @throws
 * @since
*/
@Mapper
@Repository
public interface QueryDao {

    /**
     * @return 某个库所有表名和注释 gateway_admin_stable为库名
     */
    List<Tables> getAllTables(@Param("dbName") String dbName);

    @Select("SHOW FULL FIELDS FROM  `${dbName}`.${tableName}")
    List<TableFileds> getTable(@Param("dbName") String dbName,@Param("tableName") String tableName);


}
